package cn.bone.stress.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;

import java.lang.reflect.Method;

/**
 * Created by superbone on 2017/3/31.
 */
public class MyAsyncExceptionHandler implements AsyncUncaughtExceptionHandler {

    private Logger logger = LoggerFactory.getLogger("异常handler");
    @Override
    public void handleUncaughtException(Throwable ex, Method method, Object... params) {
        logger.info("message:"+ex.getMessage());
        logger.info("method:"+method.getName());
    }
}
